// const baseUrl = 'http://hyxs.ychlkj.cn/api';
import {
	request
} from './request'

// get
// export function xxx(query) {
//   return request({
//     url: ``,
//     method: 'get',
//     reveal: true,
//     query
//   })
// }

// post
// export function xxx(data) {
//   return request({
//     url: ``,
//     method: 'post',
//     reveal: true,
//     data: data
//   })
// }

// 登录接口封装
export function postUserLogin(data) {
  return request({
    url: `/user/mobilelogin`,
    method: 'post',
    reveal: true,
    data: data
  })
}

// 注册会员 /api/user/register
export function postUserRegister(data) {
  return request({
    url: `/user/register`,
    method: 'post',
    reveal: true,
    data: data
  })
}

// 首页接口普/api
export function getIndexIndex(query) {
  return request({
    url: `/index/index`,
    method: 'get',
    reveal: true,
    query
  })
}

// 完结榜接口/api/my/renew
export function getMyRenew(query) {
  return request({
    url: `/my/renew`,
    method: 'get',
    reveal: true,
    query
  })
}

// 排行榜接口 /api/my/hot
export function getMyHot(query) {
  return request({
    url: `/my/hot`,
    method: 'get',
    reveal: true,
    query
  })
}

// 分类接口 选择分类 /api
export function getIndexCateList(query) {
  return request({
    url: `/index/cateList`,
    method: 'get',
    reveal: true,
    query
  })
}

// 查看更多 /api/my/moreList
export function getMyMoreList(query) {
  return request({
    url: `/my/moreList`,
    method: 'get',
    reveal: true,
    query
  })
}

// 我的书架接口  /api/my/cateList
export function getMyCateList(query) {
  return request({
    url: `/my/cateList`,
    method: 'get',
    reveal: true,
    query
  })
}

// 加入书架  /api/my/add_shelf
export function getMyAddShelf(query) {
  return request({
    url: `/my/add_shelf`,
    method: 'get',
    reveal: true,
    query
  })
}

// 从书架删除 /api/my/adel_shelf
export function getMyAdelShelf(query) {
  return request({
    url: `/my/adel_shelf`,
    method: 'get',
    reveal: true,
    query
  })
}

// 图书详情接口 /api/my/bookInfo
export function getMyBookInfo(query) {
  return request({
    url: `/my/bookInfo`,
    method: 'get',
    reveal: true,
    query
  })
}


//  设置阅读偏好 /api/my/editLike
export function getMyEditLike(query) {
  return request({
    url: `/my/editLike`,
    method: 'get',
    reveal: true,
    query
  })
}
// 求书接口 /api/my/needbook
export function getMyNeedbook(query) {
  return request({
    url: `/my/needbook`,
    method: 'get',
    reveal: true,
    query
  })
}
// 搜索图书列表 /api/my/search
export function getMytuiList(query) {
  return request({
    url: `/my/tuiList`,
    method: 'get',
    reveal: true,
    query
  })
}
// 搜索书推荐
export function getMySearch(query) {
  return request({
    url: `/my/search`,
    method: 'get',
    reveal: true,
    query
  })
}
//  退出登录 /api/user/logout
export function postUserLogout(data) {
  return request({
    url: `/user/logout`,
    method: 'post',
    reveal: true,
    data: data
  })
}
// 用户详情 /api/my/userInfo
export function getMyUserInfo(query) {
  return request({
    url: `/my/userInfo`,
    method: 'get',
    reveal: true,
    query
  })
}
// 意见反馈 /api/my/feedback
export function getMyFeedback(query) {
  return request({
    url: `/my/feedback`,
    method: 'get',
    reveal: true,
    query
  })
}

// 帮助中心 /api/my/help
export function getMyHelp(query) {
  return request({
    url: `/my/help`,
    method: 'get',
    reveal: true,
    query
  })
}
// 获取微信 /api/my/weixin
export function getMyUserWeixin(query) {
  return request({
    url: `/my/weixin`,
    method: 'get',
    reveal: true,
    query
  })
}
// 获取会员价格列表 /api/vip/vipList
export function getVipVipList(query) {
  return request({
    url: `/vip/vipList`,
    method: 'get',
    reveal: true,
    query
  })
}
// 购买会员 /api/vip/submit
export function getVipSubmit(data) {
  return request({
    url: `/vip/submit`,
    method: 'post',
    reveal: true,
    data: data
  })
}
// 获取充值配置 /api/my/moneyConfig
export function getmoneyConfig(query) {
  return request({
    url: `/my/moneyConfig`,
    method: 'get',
    reveal: true,
    query
  })
}
// 开始阅读 /api/my/stratLook
export function getstratLook(query) {
  return request({
    url: `/my/stratLook`,
    method: 'get',
    reveal: true,
    query
  })
}

// 设置自动扣费 /api/my/autokou
export function getautokou(query) {
  return request({
    url: `/my/autokou`,
    method: 'get',
    reveal: true,
    query
  })
}
// 消费记录 /api/my/moneyLog
export function getmoneyLog(query) {
  return request({
    url: `/my/moneyLog`,
    method: 'get',
    reveal: true,
    query
  })
}
// POST 充值接口 /api/vip/money
export function getvipmoney(data) {
  return request({
    url: `/vip/money`,
    method: 'post',
    reveal: true,
    data: data
  })
}
// 获取用户协议和隐私政策 /api/index/getContent
export function getContent(query) {
  return request({
    url: `/index/getContent`,
    method: 'get',
    reveal: true,
    query
  })
}
// 购买章节 /api/my/buyBooksJie
export function getBuyBooksJie(query) {
  return request({
    url: `/my/buyBooksJie`,
    method: 'get',
    reveal: true,
    query
  })
}

//  发送验证码 /api/sms
export function postSmsSend(data) {
  return request({
    url: `/sms/send`,
    method: 'post',
    reveal: true,
    data: data
  })
}

//  搜索历史 /api/my/searchLog
export function getSearchLog(query) {
  return request({
    url: `/my/searchLog`,
    method: 'get',
    reveal: true,
    query
  })
}

// 清空搜索历史 /api/my/delsearchLog
export function getDelsearchLog(query) {
  return request({
    url: `/my/delsearchLog`,
    method: 'get',
    reveal: true,
    query
  })
}

// uuid注册登录 /api/user/uuidregister
export function postUuidregister(data) {
  return request({
    url: `/user/uuidregister`,
    method: 'post',
    reveal: true,
    data: data
  })
}

// 获取我的任务列表 /api/index/getViewCardList
export function getViewCardList(query) {
  return request({
    url: `/index/getViewCardList`,
    method: 'get',
    reveal: true,
    query
  })
}

// 获取我的金币明细列表 /api/index/myscore
export function getMyScore(query) {
  return request({
    url: `/index/myscore`,
    method: 'get',
    reveal: true,
    query
  })
}

// 获取我的书券明细列表 /api/index/mymoney
export function getMyMoney(query) {
  return request({
    url: `/index/mymoney`,
    method: 'get',
    reveal: true,
    query
  })
}

// 获取观阅任务 /api/index/get_view_card
export function getViewCard(query) {
  return request({
    url: `/index/get_view_card`,
    method: 'get',
    reveal: true,
    query
  })
}

// 金币兑换书卷 /api/index/convert_money
export function convertMoney(query) {
  return request({
    url: `/index/convert_money`,
    method: 'get',
    reveal: true,
    query
  })
}

// 转赠书卷 /api/index/givemoney
export function giveMoney(query) {
  return request({
    url: `/index/givemoney`,
    method: 'get',
    reveal: true,
    query
  })
}

//观阅币兑换观阅包 /api/index/moneyViewCard
export function moneyViewCard(query) {
  return request({
    url: `/index/moneyViewCard`,
    method: 'get',
    reveal: true,
    query
  })
}

//我的粉丝 /api/index/myfans
export function getMyFans(query) {
  return request({
    url: `/index/myfans`,
    method: 'get',
    reveal: true,
    query
  })
}

//获取当日书券和金币兑换比例接口 /api/index/convert
export function getConvert(query) {
  return request({
    url: `/index/convert`,
    method: 'get',
    reveal: true,
    query
  })
}

//修改个人信息 /api/user/profile
export function profile(data) {
  return request({
    url: `/user/profile`,
    method: 'post',
    reveal: true,
    data: data
  })
}

//修改密码 /api/user/resetpwd
export function resetpwd(query) {
  return request({
    url: `/user/resetpwd`,
    method: 'get',
    reveal: true,
    query
  })
}

//首页排行榜
export function getPaihang(query) {
  return request({
    url: `/my/paihang`,
    method: 'get',
    reveal: true,
    query
  })
}
//观看小说获得观阅收益
export function getViewCardMoney(query) {
  return request({
    url: `/index/getViewCardMoney`,
    method: 'get',
    reveal: true,
    query
  })
}

// 获取数据接口封装
// export function getData(params) {
//   return uni.request({
//     url:  '/data',
//     method: 'GET',
//     data: params
//   });
// }
